/**
 * @Auto generation code
 * 营销相关接口，包括优惠券等
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, loading
 * 用户的优惠券列表 - GET
 */
export const getCustomerUsableCards = async ({// query params
		start ,   // 列表开始  
		limit  = param.default ,   // 列表长度  
		city   // 城市区号  
	
}, loading) => {
	return await request.get('/customer/card', {
		 start,  limit,  city, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 领取优惠券 - POST
 */
export const collectCardTypeTwo = async (loading) => {
	return await request.post('/customer/card/collect', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * collectQrCard - POST
 */
export const collectQrCard = async (loading) => {
	return await request.post('/customer/card/collect/qr', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * collectShareCard - GET
 */
export const collectShareCard = async ({// query params
		distributor ,   // distributor ,必填 
		coupon ,   // coupon ,必填 
		phone ,   // phone ,必填 
		valid ,   // valid ,必填 
		callback   // callback ,必填 
	
}, loading) => {
	return await request.get('/customer/card/collect/share', {
		 distributor,  coupon,  phone,  valid,  callback, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 兑换优惠券 - POST
 */
export const collectCard = async (loading) => {
	return await request.post('/customer/card/exchange', {
		
	}, {
		
	}, loading)
}

